package com.charger.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.charger.mapper.FailureMapper;
import com.charger.domain.Failure;
import com.charger.service.IFailureService;

/**
 * 故障管理Service业务层处理
 * 
 * @author xuan
 * @date 2024-11-22
 */
@Service
public class FailureServiceImpl implements IFailureService 
{
    @Autowired
    private FailureMapper failureMapper;

    /**
     * 查询故障管理
     * 
     * @param failureId 故障管理主键
     * @return 故障管理
     */
    @Override
    public Failure selectFailureByFailureId(Long failureId)
    {
        return failureMapper.selectFailureByFailureId(failureId);
    }

    /**
     * 查询故障管理列表
     * 
     * @param failure 故障管理
     * @return 故障管理
     */
    @Override
    public List<Failure> selectFailureList(Failure failure)
    {
        return failureMapper.selectFailureList(failure);
    }

    /**
     * 新增故障管理
     * 
     * @param failure 故障管理
     * @return 结果
     */
    @Override
    public int insertFailure(Failure failure)
    {
        return failureMapper.insertFailure(failure);
    }

    /**
     * 修改故障管理
     * 
     * @param failure 故障管理
     * @return 结果
     */
    @Override
    public int updateFailure(Failure failure)
    {
        return failureMapper.updateFailure(failure);
    }

    /**
     * 批量删除故障管理
     * 
     * @param failureIds 需要删除的故障管理主键
     * @return 结果
     */
    @Override
    public int deleteFailureByFailureIds(Long[] failureIds)
    {
        return failureMapper.deleteFailureByFailureIds(failureIds);
    }

    /**
     * 删除故障管理信息
     * 
     * @param failureId 故障管理主键
     * @return 结果
     */
    @Override
    public int deleteFailureByFailureId(Long failureId)
    {
        return failureMapper.deleteFailureByFailureId(failureId);
    }
}
